<div class='new_sm'>
<% remote_form_for @sm,
     :update => "user_#{@user.id}_last_sms",
     :url => create_sm_users_url,
     :method => :post,    
     :loading => small_loading("user_#{@user.id}_last_sms", :height => '20px'),      
     :html => {
       :id => "#{@user.id}_new_sm_form"
     } do |f|
 %> 
  <dl>
    <dt>短信：</dt>
    <dd><%= f.text_field :content, :size => 90 %></dd>
    <dd>
      <%= f.hidden_field :user_id %>      
    </dd>
  </dl>    
  <dl>    
    <dd class="right">
      <%= link_to_function '发送', "$('#{@user.id}_new_sm_form').onsubmit()", :class => :submit %>      
      <%= link_to_remote '返回',
            :update => "user_#{@user.id}_last_sms",
            :url => last_sms_user_url(@user),
            :method => :get,
            :html => {
              :class => :reset
            }
      %> 
    </dd>
  </dl>
<% end %>
<script type="text/javascript" charset="utf-8">
  <% if @error.present? %>
  alert("<%= t @error %>导致绑定失败，请重试");
  <% end %>
</script>
</div>